package com.autumn.zero.workflow.entitys.querys;

import java.util.Date;

import javax.persistence.Table;

import com.autumn.mybatis.mapper.annotation.ViewTable;

/**
 * 已办任务查询
 * 
 * @author 杨昌国 2019-02-26 11:31:38
 */
@Table
@ViewTable(WorkflowUserTaskCompleteQuery.QUERY_COMMAND_TEXT)
public class WorkflowUserTaskCompleteQuery extends AbstractWorkflowUserTaskQuery {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1138127400364819658L;
	/**
	 * 
	 */
	static final String QUERY_COMMAND_TEXT = "SELECT a.id,a.flow_process_id,a.user_name,a.task_no,a.user_id,a.task_name,a.task_time,a.task_summary,a.complete_time,a.task_result,a.task_opinion,a.gmt_create,b.form_type,b.form_id,b.form_no,b.form_name,b.flow_title,b.process_instance_id,b.start_user_name FROM sys_workflow_user_task_complete AS a INNER JOIN sys_workflow_process AS b ON a.flow_process_id = b.id";

	/**
	 * 用户名称
	 */
	private String userName;

	/**
	 * 完成时间
	 */
	private Date completeTime;

	/**
	 * 任务结果 {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	private Integer taskResult;

	/**
	 * 任务意见
	 */
	private String taskOpinion;

	/**
	 * 获取用户名称
	 * 
	 * @return
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * 设置用户名称
	 * 
	 * @param userName
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * 获取完成时间
	 * 
	 * @return
	 */
	public Date getCompleteTime() {
		return completeTime;
	}

	/**
	 * 设置完成时间
	 * 
	 * @param completeTime 完成时间
	 */
	public void setCompleteTime(Date completeTime) {
		this.completeTime = completeTime;
	}

	/**
	 * 获取任务结果
	 * 
	 * @return {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	public Integer getTaskResult() {
		return taskResult;
	}

	/**
	 * 设置任务结果
	 * 
	 * @param taskResult 任务结果
	 *                   {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	public void setTaskResult(Integer taskResult) {
		this.taskResult = taskResult;
	}

	/**
	 * 获取任务意见
	 * 
	 * @return
	 */
	public String getTaskOpinion() {
		return taskOpinion;
	}

	/**
	 * 设置任务意见
	 * 
	 * @param taskOpinion
	 */
	public void setTaskOpinion(String taskOpinion) {
		this.taskOpinion = taskOpinion;
	}
}
